package com.hfzy.ihk.common.facade.entity;


import com.hfzy.ihk.common.facade.CodeType;

/**
 * Created by Administrator on 2018/1/13.
 *
 * @author wws
 */

public class KeyValueField implements CodeType {

    private String key;
    private String value;

    public KeyValueField() {
    }

    public KeyValueField(String key) {
        this.key = key;
    }

    public KeyValueField(String key, String value) {
        this.key = key;
        this.value = value;
    }

    @Override
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj==null){
            return false;
        }
        if(this==obj){
            return true;
        }
        if(obj instanceof KeyValueField){
            KeyValueField keyValueField=(KeyValueField)obj;
            if(keyValueField.key.equals(this.key)&&keyValueField.value.equals(this.value)){
                return true;
            }else{
                return false;
            }
        }
        return false;
    }
}
